import {createStore,applyMiddleware} from 'redux'
import rootReducer from './reducer/root.reducer'
import createSagaMidlleWare from 'redux-saga'
import todoSage from '../store/saga/todo.saga'

const sagaMiddleWare = createSagaMidlleWare()
const store = createStore(rootReducer, applyMiddleware(sagaMiddleWare))

sagaMiddleWare.run(todoSage)

export default store
/* 
  当前模块完成 store 创建 + 中间件注册
*/
